package org.example.cet.demos.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ResultE {
    SUCCESS(HttpStatus.OK.value(),"操作成功"),
    NULLERROR(HttpStatus.BAD_REQUEST.value(), "传参异常"),
    UNAUTHORIZEDERROR(HttpStatus.UNAUTHORIZED.value(),"未认证"),
    TOKENDERROR(HttpStatus.UNAUTHORIZED.value(),"身份认证令牌异常或失效"),
    FORBIDDEN(HttpStatus.FORBIDDEN.value(),"无权访问"),
    NOTFOUND(HttpStatus.NOT_FOUND.value(),"没有找到相关资源"),
    SYSTEMERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(),"系统错误");
    private Integer code;
    private String message;
}
